package com.lanou3g.hw0518.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionBindingEvent;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

@WebListener()
public class AppListener implements ServletContextListener
        {

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent)
    {

        Set<String>loginUsers=new HashSet<>();
        ServletContext app = servletContextEvent.getServletContext();
        app.setAttribute("loginUsers",loginUsers);


    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }


}

